<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/apsproject/base/Aps_ShiftDetail.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/apsproject/base/Aps_ShiftDetail.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Aps_ShiftDetail",
        setup() {
            const table = ref({
                key: "ShiftDetailId",
                footer: "Foots",
                cnName: "班表明细",
                name: "base/Aps_ShiftDetail",
                newTabEdit: false,
                url: "/Aps_ShiftDetail/",
                sortName: "ShiftDetailId"
            });
            const editFormFields = ref({"ClockInType":"","StartType":"","StartTime":"","EndType":"","EndTime":"","Hours":""});
            const editFormOptions = ref([[{"dataKey":"APS_ClockInType","data":[],"title":"类型 ","required":true,"field":"ClockInType","type":"select"}],
                              [{"dataKey":"APS_ShiftStartType","data":[],"title":"开始类型","required":true,"field":"StartType","type":"select"},
                               {"title":"工作开始时间","required":true,"field":"StartTime","type":"time"}],
                              [{"dataKey":"APS_ShiftStartType","data":[],"title":"结束类型","required":true,"field":"EndType","type":"select"},
                               {"title":"工作结束时间","required":true,"field":"EndTime","type":"time"}],
                              [{"title":"工时","required":true,"field":"Hours","type":"number"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:"ShiftId",title:"ShiftId",type:"bigint",width:110,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"ClockInType",title:"类型 ",type:"int",bind:{ key:"APS_ClockInType",data:[]},width:110,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"StartType",title:"开始类型",type:"int",bind:{ key:"APS_ShiftStartType",data:[]},width:110,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"StartTime",title:"工作开始时间",type:"datetime",width:110,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"EndType",title:"结束类型",type:"int",bind:{ key:"APS_ShiftStartType",data:[]},width:110,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"EndTime",title:"工作结束时间",type:"datetime",width:110,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Hours",title:"工时",type:"int",width:110,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"CreateId",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"ModifyId",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Createtor",title:"创建人",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"ShiftDetailId",title:"ShiftDetailId",type:"bigint",width:120,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
